<template>
  <div>
    {{ getVueBlogs() }}
    <button @click="counter += 1">{{ counter }}</button>
  </div>
</template>

<script>
export default {
  name: "App",
  data() {
    return {
      blogPosts: [
        "Vue 3.x入门",
        "Vue 3.x完全指南",
        "React 18 新特性介绍",
        "JavaScript 基础语法概览",
      ],
      counter: 0,
    };
  },
  computed: {
    vueBlogs() {
      console.log("111");
      return this.blogPosts.filter((blog) => blog.includes("Vue"));
    },
  },
  methods: {
    getVueBlogs() {
      console.log("111");
      return this.blogPosts.filter((blog) => blog.includes("Vue"));
    },
  },
};
</script>

<style></style>
